package com.example.qxfw.common.util;

import com.example.qxfw.common.entity.DangerSource;
import com.example.qxfw.common.entity.PotentialPoints;
import com.example.qxfw.common.entity.layer.*;
import com.example.qxfw.common.entity.yj.ImpGoal;
import com.example.qxfw.common.entity.zy.FireHistory;
import com.example.qxfw.common.entity.zy.WaterLoggingPointInfo;

import java.util.ArrayList;
import java.util.List;

public class LayerUtil {

    /**
     * 获取图层对象
     *
     * @param layerName
     * @return
     */
    public static Class getLayerClass(String layerName) {
        List<Object> layerObject = new ArrayList<>();
        Class objectClass = null;
        switch (layerName) {
            case "村庄":
                objectClass = VillagePointLayer.class;
                break;
            case "乡界面":
                objectClass = TownshipLayer.class;
                break;
            case "铁路":
                objectClass = RailwayLayer.class;
                break;
            case "乡村道路":
                objectClass = CountryRoadLayer.class;
                break;
            case "国道":
                objectClass = NationalRoadLayer.class;
                break;
            case "省道":
                objectClass = ProvincialRoadLayer.class;
                break;
            case "高速":
                objectClass = HighwayLayer.class;
                break;
            case "县道":
                objectClass = CountyRoadLayer.class;
                break;
            case "水系":
                objectClass = WaterSystemLayer.class;
                break;
            case "灾害点":
                objectClass = PotentialPoints.class;
                break;
            case "重要目标":
                objectClass = ImpGoal.class;
                break;
            case "危险源":
                objectClass = DangerSource.class;
                break;
            case "易涝点":
                objectClass = WaterLoggingPointInfo.class;
                break;
            case "历史火点":
                objectClass = FireHistory.class;
                break;
        }
        return objectClass;
    }
}
